﻿using System;
using System.Collections.Generic;
using System.Data;
using YmtRpc.Domain;
using YmtRpc.Domain.Enum;

namespace Ymt.Repository
{

    /// <summary>
    /// 服务依赖采样的仓储类
    /// </summary>
    public interface IServicedependencysamplingRepository : IMySQLRepository<ServiceDependencySampling>
    {
        /// <summary>
        /// 根据服务之间的依赖构建依赖树
        /// </summary>
        /// <param name="serviceDependencylist"></param>
        /// <returns></returns>
        List<ServiceDependencyNode> PopulateDependencyTree(ServiceDependencyQueryCondition cond);

        /// <summary>
        /// 根据依赖关系获取服务名列表
        /// </summary>
        /// <param name="dependencyRelation"></param>
        /// <returns></returns>
        List<string> GetAppIdListByDependencyRelation(DependencyRelationEnum dependencyRelation);

        /// <summary>
        /// 采样数据查询
        /// </summary>
        /// <param name="queryCond"></param>
        /// <param name="pageInfo"></param>
        /// <returns></returns>
        List<ServiceDependencySampling> GetServiceDependencySamplingList(ServiceDependencySamplingQueryCondition queryCond, PaginationEntity pageInfo = null);
    }
}
